﻿using System;
using System.IO;
using FileTransformer;

namespace Test
{
    public class Test
    {
        public static void DoLog(string text)
        {
            Console.WriteLine(text);
        }

        public static void Main()
        {
            //const string basis = "D:\\Work\\Projects\\Temp\\";
            const string basis = "E:\\Project\\";

            var o = new DataSourceList();
            o.OnLog += DoLog;

            var f = new PathSourceFactory { OnFilter = fileName => Path.GetExtension(fileName) == ".cs" };
            f.OnNewItem += o.Add;
            f.Process(basis);

            o.Add("readme.txt", new TextSourceItem("aaaaabuiysdbfuyv"));

            DataProcessor.RunDown(o, 46080, index => string.Format("E:\\Project\\ATest\\test_{0}.txt", index));

            // Test
            // p.RunTest(headerFile, origin);

            DoLog("Done");
            Console.ReadLine();
        }


    }
}